package com.huaxiafinance.management.util;


import com.huaxia.middleware.sdk.utils.StringUtil;


/**
 * Created by lenovo on 2017/4/21.
 */
public class FileUtil
{

    /**
     * 获取文件后缀名
     *
     * @param fileName
     * @return String
     */
    public static String getFileExtension(String fileName)
    {
        if (StringUtil.isEmpty(fileName))
        {
            return "";
        }
        int i = fileName.lastIndexOf(".");
        if (i != -1)
        {
            return fileName.substring(i);
        }
        else
        {
            return "";
        }
    }
}
